#pragma once
#include "refc_ptr.h"
#include "index_buffer.h"
#include "vertex_buffer.h"
#include "material.h"

namespace krryn{
namespace view{
	class model;
	class mesh{
	public:
		core::refc_ptr<index_buffer> get_index_buffer() { return m_IndexBuffer; }
		core::refc_ptr<vertex_buffer> get_vertex_buffer() { return m_VertexBuffer; }
		core::refc_ptr<material> get_material() { return m_Material; }

		mesh(krryn::core::refc_ptr<index_buffer> a_IndexBuffer, krryn::core::refc_ptr<vertex_buffer> a_VertexBuffer, krryn::core::refc_ptr<material> a_Material)
			: m_IndexBuffer(a_IndexBuffer), m_VertexBuffer(a_VertexBuffer), m_Material(a_Material) {}

		model *get_parent() { return m_Parent; }
		void set_parent(model *a_Parent) { m_Parent = a_Parent; }

	private:
		core::refc_ptr<index_buffer> m_IndexBuffer;
		core::refc_ptr<vertex_buffer> m_VertexBuffer;
		core::refc_ptr<material> m_Material;
		model *m_Parent;
	};
}
}